package com.detection.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取项目相关配置
 *
 * @author
 */
@Component
@ConfigurationProperties(prefix = "detection")
public class DetectionConfig
{
    /** 项目名称 */
    private String name;

    /** 版本 */
    private String version;

    /** 版权年份 */
    private String copyrightYear;

    /** 实例演示开关 */
    private boolean demoEnabled;

    /** 上传路径 */
    private static String profile;

    /** 获取地址开关 */
    private static boolean addressEnabled;

    private static boolean deployOneMachineEnabled;

    /** 验证码类型 */
    private static String captchaType;

    private static String personModelPath;

    private static String smokeModelPath;

    private static String fireModelPath;

    private static String phoneModelPath;

    private static String clothingModelPath;

    private static String campCode;

    private static String campName;

    private static String tcpClientIP;

    private static String tcpClientPort;

    private static String tcpFileClientPort;

    private static String tcpServerPort;

    private static String openh264;

    private static String sendAddress;

    private static String opencvLib;

    private static String isVideo;

    private static String videoPath;

    private static String isSendTCP;

    private static String sendTCPIP;

    private static String ehcacheFilePath;

    private static Boolean fileTransferEnabled;

    private static String ffmpegPath;

    private static String hikvisionRootRegionId;

    private static String IOTplatform;

    public static String getIOTplatform() {
        return IOTplatform;
    }

    public void setIOTplatform(String IOTplatform) {
        DetectionConfig.IOTplatform = IOTplatform;
    }

    public static String getHikvisionRootRegionId() {
        return hikvisionRootRegionId;
    }

    public void setHikvisionRootRegionId(String hikvisionRootRegionId) {
        DetectionConfig.hikvisionRootRegionId = hikvisionRootRegionId;
    }

    public static String getFfmpegPath() {
        return ffmpegPath;
    }

    public void setFfmpegPath(String ffmpegPath) {
        DetectionConfig.ffmpegPath = ffmpegPath;
    }

    public static Boolean getFileTransferEnabled() {
        return fileTransferEnabled;
    }

    public void setFileTransferEnabled(Boolean fileTransferEnabled) {
        DetectionConfig.fileTransferEnabled = fileTransferEnabled;
    }

    public static String getEhcacheFilePath() {
        return ehcacheFilePath;
    }

    public void setEhcacheFilePath(String ehcacheFilePath) {
        DetectionConfig.ehcacheFilePath = ehcacheFilePath;
    }

    public static String getIsSendTCP() {
        return isSendTCP;
    }

    public void setIsSendTCP(String isSendTCP) {
        DetectionConfig.isSendTCP = isSendTCP;
    }

    public static String getSendTCPIP() {
        return sendTCPIP;
    }

    public void setSendTCPIP(String sendTCPIP) {
        DetectionConfig.sendTCPIP = sendTCPIP;
    }

    public static String getIsVideo() {
        return isVideo;
    }

    public void setIsVideo(String isVideo) {
        DetectionConfig.isVideo = isVideo;
    }

    public static String getVideoPath() {
        return videoPath;
    }

    public void setVideoPath(String videoPath) {
        DetectionConfig.videoPath = videoPath;
    }

    public static String getOpencvLib() {
        return opencvLib;
    }

    public void setOpencvLib(String opencvLib) {
        DetectionConfig.opencvLib = opencvLib;
    }

    public static String getSendAddress() {
        return sendAddress;
    }

    public void setSendAddress(String sendAddress) {
        DetectionConfig.sendAddress = sendAddress;
    }

    public static String getOpenh264() {
        return openh264;
    }

    public void setOpenh264(String openh264) {
        DetectionConfig.openh264 = openh264;
    }

    public static String getTcpClientIP() {
        return tcpClientIP;
    }

    public void setTcpClientIP(String tcpClientIP) {
        DetectionConfig.tcpClientIP = tcpClientIP;
    }

    public static String getCampName() {
        return campName;
    }

    public void setCampName(String campName) {
        DetectionConfig.campName = campName;
    }

    public static String getTcpFileClientPort() {
        return tcpFileClientPort;
    }

    public void setTcpFileClientPort(String tcpFileClientPort) {
        DetectionConfig.tcpFileClientPort = tcpFileClientPort;
    }

    public static String getTcpClientPort() {
        return tcpClientPort;
    }

    public void setTcpClientPort(String tcpClientPort) {
        DetectionConfig.tcpClientPort = tcpClientPort;
    }

    public static String getTcpServerPort() {
        return tcpServerPort;
    }

    public void setTcpServerPort(String tcpServerPort) {
        DetectionConfig.tcpServerPort = tcpServerPort;
    }

    public static String getCampCode() {
        return campCode;
    }

    public void setCampCode(String campCode) {
        this.campCode = campCode;
    }

    public static String getSaveVideoPath() {
        return getProfile() + "/video";
    }

    public static String getPersonModelPath() {
        return personModelPath;
    }

    public void setPersonModelPath(String personModelPath) {
        this.personModelPath = personModelPath;
    }

    public static String getSmokeModelPath() {
        return smokeModelPath;
    }

    public void setSmokeModelPath(String smokeModelPath) {
        this.smokeModelPath = smokeModelPath;
    }

    public static String getFireModelPath() {
        return fireModelPath;
    }

    public void setFireModelPath(String fireModelPath) {
        this.fireModelPath = fireModelPath;
    }

    public static String getPhoneModelPath() {
        return phoneModelPath;
    }

    public void setPhoneModelPath(String phoneModelPath) {
        this.phoneModelPath = phoneModelPath;
    }

    public static String getClothingModelPath() {
        return clothingModelPath;
    }

    public void setClothingModelPath(String clothingModelPath) {
        this.clothingModelPath = clothingModelPath;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getVersion()
    {
        return version;
    }

    public void setVersion(String version)
    {
        this.version = version;
    }

    public String getCopyrightYear()
    {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear)
    {
        this.copyrightYear = copyrightYear;
    }

    public boolean isDemoEnabled()
    {
        return demoEnabled;
    }

    public void setDemoEnabled(boolean demoEnabled)
    {
        this.demoEnabled = demoEnabled;
    }

    public static String getProfile()
    {
        return profile;
    }

    public void setProfile(String profile)
    {
        DetectionConfig.profile = profile;
    }

    public static boolean isAddressEnabled()
    {
        return addressEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled)
    {
        DetectionConfig.addressEnabled = addressEnabled;
    }

    public static boolean isDeployOneMachineEnabled() {
        return deployOneMachineEnabled;
    }

    public  void setDeployOneMachineEnabled(boolean deployOneMachineEnabled) {
        DetectionConfig.deployOneMachineEnabled = deployOneMachineEnabled;
    }

    public static String getCaptchaType() {
        return captchaType;
    }

    public void setCaptchaType(String captchaType) {
        DetectionConfig.captchaType = captchaType;
    }

    /**
     * 获取导入上传路径
     */
    public static String getImportPath()
    {
        return getProfile() + "/import";
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath()
    {
        return getProfile() + "/avatar";
    }

    /**
     * 获取视频分析路径
     */
    public static String getDetectionPath()
    {
        return getProfile() + "/detection";
    }

    /**
     * 获取视频分析路径
     */
    public static String getSmokeDetectionPath()
    {
        return getProfile() + "/detection/smoke";
    }

    /**
     * 获取视频分析路径
     */
    public static String getPersonDetectionPath()
    {
        return getProfile() + "/detection/person";
    }

    /**
     * 获取视频分析路径
     */
    public static String getFireDetectionPath()
    {
        return getProfile() + "/detection/fire";
    }

    /**
     * 获取视频分析路径
     */
    public static String getPhoneDetectionPath()
    {
        return getProfile() + "/detection/phone";
    }

    /**
     * 获取视频分析路径
     */
    public static String getClothingDetectionPath()
    {
        return getProfile() + "/detection/clothing";
    }

    /**
     * 获取视频分析路径
     */
    public static String getPersonDetectionPathForEquipment()
    {
        return getProfile() + "/detection/equipment";
    }

    /**
     * 获取视频分析路径
     */
    public static String getPersonDetectionPathForCarrier()
    {
        return getProfile() + "/detection/carrier";
    }

    /**
     * 获取巡更图片上传路径
     */
    public static String getPatrolPicPath()
    {
        return getProfile() + "/patrol";
    }

    /**
     * 获取下载路径
     */
    public static String getDownloadPath()
    {
        return getProfile() + "/download/";
    }

    /**
     * 获取临时路径
     */
    public static String getTempPath()
    {
        return getProfile() + "/temp/";
    }

    /**
     * 获取上传路径
     */
    public static String getUploadPath()
    {
        return getProfile() + "/upload";
    }
}
